extends HBoxContainer

@onready var root = $"."

func _get_selected_days()->Array[int]:
	var days:Array[int] = []
	if %w1.button_pressed:
		days.append(1)
	if %w2.button_pressed:
		days.append(2)
	if %w3.button_pressed:
		days.append(3)
	if %w4.button_pressed:
		days.append(4)
	if %w5.button_pressed:
		days.append(5)
	if %w6.button_pressed:
		days.append(6)
	if %w7.button_pressed:
		days.append(7)
	return days

func _set_days(days:Array[int]):
	for i in range(root.get_child_count()):
		var child:Button = root.get_child(i)
		child.button_pressed = i+1 in days
